﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Core
{
    public class ProductMapper:EntityTypeConfiguration<Product>
    {
        public ProductMapper()
        {
            this.HasKey(s => s.ID);
            this.Property(s => s.ID).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            this.Property(s => s.ID).IsRequired();

            this.Property(s => s.CategoryId).IsRequired();
             
        }
    }
}
